Semantic-enriched Code Knowledge Graph to Reveal Unknowns in Smart Contract Code Reuse
نویسندگان
چکیده
Programmers who work with smart contract development often encounter challenges in reusing code from repositories. This is due to the presence of two unknowns that can lead non-functional and functional failures. These are implicit collaborations between functions subtle differences among similar functions. Current mining methods extract syntax semantic knowledge (known knowledge), but they cannot uncover these a significant gap known unknown. To address this issue, we formulate acquisition as deduction task propose an analytic flow uses function-clone bridge gradually deduce into problem-solving reveal unknowns. comprises five methods: clone detection, co-occurrence probability calculation, function usage frequency accumulation, description propagation, CFG annotation. provides systematic coherent approach deduction. We then structure all semantic-enriched Knowledge Graph (KG) integrate KG software engineering tasks: recommendation crowd-scaled coding practice checking. As proof concept, apply our 5,140 files available on Etherscan.io, confirm high accuracy construction steps. In experiments, effectively improved by 6% 45%, increased diversity 61% 102%, enhanced NDCG 1% 21%. Furthermore, compared traditional analysis tools debugging-with-the-crowd method, time efficiency 30-380 seconds, vulnerability determination 20%-33%, fixing 24%-40% for novice developers identified fixed vulnerable
منابع مشابه
Inheritance: from code reuse to reasoning reuse
In the Object-Oriented approach a designer can, given an existing base class, use inheritance to build a derived class that extends, or that slightly differs from the base class. But in order to exploit the full potential of inheritance to build systems incrementally, the designer must also be able to reason about the derived class incrementally. This paper presents a specification notation and...
متن کاملBitShred: Fast, Scalable Code Reuse Detection in Binary Code
Many experts believe that new malware is created at a rate faster than legitimate software. For example, in 2007 over one million new malware samples were collected by a major security solution vendor. However, it is often speculated, though to the best of our knowledge unproven, that new malware is produced by modifying existing malware, either through simple tweaks, code composition, or a var...
متن کاملTesting Prototypes Validity to Enhance Code Reuse
The complexity of distributed systems is a problem when designers want to evaluate their safety and liveness. Often, they are built by integration of existing components with newly developed ones. Actually, it is valuable to handle the integration of external pieces of software in the specification and testing activities. However, it is difficult to validate them formally unless doing reverse-e...
متن کاملTypesafe Code Reuse Across ASTs via Code Generation
Writing data structures for abstract syntax trees (ASTs) in a conventional OO programming language is tedious and error-prone. Hence, programmers often use AST generators to generate OO code from a higher-level description. This article argues that the existing AST generators do not provide good support for programs that manipulate several similar structural variations of an AST. Using a conven...
متن کاملReuse of TTCN-3 Code
Today, the growing size and complexity of software along with decreasing development times causes tremendous challenges to software testing. This has driven the whole software industry to seek new ways to test more efficiently and effectively. Software reuse has been practiced for decades and successful industrial studies have demonstrated such profits as increased productivity and quality as w...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: ACM Transactions on Software Engineering and Methodology
سال: 2023
ISSN: ['1049-331X', '1557-7392']
DOI: https://doi.org/10.1145/3597206